package com.Sing.Service;

import com.Sing.Dao.TypeMapper;
import com.Sing.Pojo.Type;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;

public class TypeServiceImpl implements TypeService {

    private TypeMapper mapper;
    @Autowired
    public void setMapper(TypeMapper mapper) {
        this.mapper = mapper;
    }

    @Override
    public ArrayList<Type> getAllDataByName(HashMap<String, Object> paramMap) {
        return mapper.getAllDataByName( paramMap );
    }

    @Override
    public int getAllDataContext(HashMap<String, Object> paramMap) {
        return mapper.getAllDataContext(paramMap);
    }

    @Override
    public boolean deleteData(int id) {
        return mapper.deleteData(id);
    }

    @Override
    public boolean updateData(HashMap<String, Object> paramMap) {
        return mapper.updateData(paramMap);
    }

    @Override
    public boolean addData(HashMap<String, Object> paramMap) {
        return mapper.addData( paramMap );
    }

    @Override
    public ArrayList<Type> getAllData() {
        return mapper.getAllData();
    }

    @Override
    public Type queryTypeById(int id) {
        return mapper.queryTypeById( id );
    }
}
